<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.ArrayList,java.util.List" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Casa central IA</title>
<link rel="stylesheet" type="text/css" href="resources/view.css" media="all"/>
<script type="text/javascript" src="resources/view.js"/>
<script type="text/javascript" src="resources/calendar.js"/>
<script type="text/javascript" src="resources/functions.js"/>
</head>
<body id="main_body" >
	
	
		<h1><a>Casa central IA</a></h1>
		<div class="form_description">
			<h2>Casa central IA</h2>
			<p>Listado precios</p>
		</div>
		<form id="forma1" class="appnitro" enctype="multipart/form-data" method="post" action="ObtenerPrecios">
							
			<input id="saveForm" class="button_text" onclick="" type="submit" name="submit" value="Obtener listados de precios." />
		
		</form>
		
		
		<% try { %>
		
		<%List listadosPrecios=(List)request.getAttribute("listadosPrecios");%>
		<%for(int i=0;i<listadosPrecios.size();i++){%>
		<br />
		<br />
		<table align="center" border="2">
		<tr>
			<td>Código</td>
			<td>Característica</td>
			<td>Marca</td>
			<td>Origen</td>
			<td>Precio</td>
			<td>Cantidad</td>
		</tr>
		
			<%List listado=(List)listadosPrecios.get(i);%>
			<%for(int j=0;j<listado.size();j++){
			List rodamiento=(List)listado.get(j);%>
			<tr>
			<td><%=rodamiento.get(0)%></td>
			<td><%=rodamiento.get(1)%></td>
			<td><%=rodamiento.get(2)%></td>
			<td><%=rodamiento.get(3)%></td>
			<td><%=rodamiento.get(4)%></td>
			<td><%=rodamiento.get(5)%></td>
			</tr>
			<%}	%>
		
		
		</table>
		<%}%>
		
		<br/>
		
		<jsp:scriptlet> if( request.getAttribute("error") != null){ </jsp:scriptlet>
		<jsp:expression> request.getAttribute("error") </jsp:expression>
		<jsp:scriptlet> } </jsp:scriptlet>
		<br />
		<br />
		
		<% if( request.getAttribute("error") != null){ %>
		<%= request.getAttribute("error") %>
		<% } %>
		
		<%}catch (Exception e){%>
		<%= e.getMessage() %>
			
		<% } %>
				
	</body>
	
</html>